using MongoDB.Driver;
using Sustainalytics.Entities;
using Sustainalytics.Synchronization.Validation.Handlers.Common;
using Sustainalytics.Synchronization.Validation.Internals;

namespace Sustainalytics.Synchronization.Validation.Handlers.CorporateGovernance
{
    public class GovernanceIssuesHandler : HandlerWithGrouping<GovernanceIssue>
    {
        public GovernanceIssuesHandler(ValidationMongoCollection<GovernanceIssue> collections)
            : base(collections)
        {
        }

        protected override ProjectionDefinition<GovernanceIssue> GetProjectionDefinition()
        {
            return
                Builders<GovernanceIssue>.Projection.Include(x => x.CompanyId)
                    .Include(x => x.Comment)
                    .Include(x => x.Outlook)
                    .Include(x => x.Number);
        }
    }
}